import { createI18n } from "vue-i18n";
import zh from "./zh";
import en from "./en";
import { tr } from "element-plus/es/locale";
// const language = (navigator.language || "en").toLocaleLowerCase(); // 这是获取浏览器的语言
const i18n = createI18n({
  locale: sessionStorage.getItem("lang") || "zh", //
  fallbackLocale: "zh", // 设置备用语言
  globalInjection: true,
  allowComposition: true,
  messages: {
    en: en,
    zh: zh,
  },
});

export default i18n;
